home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / t3_1 / sources.lha / sources / sys / obsolete.t < prev    next >
Text File  |  1988-02-05  |  6KB  |  139 lines

  1. (herald obsolete (env tsys))
  2.  
  3. ;;; Copyright (c) 1985 Yale University
  4. ;;;     Authors: N Adams, R Kelsey, D Kranz, J Philbin, J Rees.
  5. ;;; This material was developed by the T Project at the Yale University Computer 
  6. ;;; Science Department.  Permission to copy this software, to redistribute it, 
  7. ;;; and to use it for any purpose is granted, subject to the following restric-
  8. ;;; tions and understandings.
  9. ;;; 1. Any copy made of this software must include this copyright notice in full.
  10. ;;; 2. Users of this software agree to make their best efforts (a) to return
  11. ;;;    to the T Project at Yale any improvements or extensions that they make,
  12. ;;;    so that these may be included in future releases; and (b) to inform
  13. ;;;    the T Project of noteworthy uses of this software.
  14. ;;; 3. All materials developed as a consequence of the use of this software
  15. ;;;    shall duly acknowledge such use, in accordance with the usual standards
  16. ;;;    of acknowledging credit in academic research.
  17. ;;; 4. Yale has made no warrantee or representation that the operation of
  18. ;;;    this software will be error-free, and Yale is under no obligation to
  19. ;;;    provide any services, by way of maintenance, update, or otherwise.
  20. ;;; 5. In conjunction with products arising from the use of this material,
  21. ;;;    there shall be no use of the name of the Yale University nor of any
  22. ;;;    adaptation thereof in any advertising, promotional, or sales literature
  23. ;;;    without prior written consent from Yale in each case.
  24. ;;;
  25.  
  26.  
  27. ;;; Definitions for backwards compatibility.
  28.  
  29. (define-local-syntax (define-obsolete old new)
  30.   `(block
  31.      (define ,old (%obsolete ',old ',new ,new))
  32.      (declare-tsys-exports ',old)))
  33.  
  34. (define-local-syntax (define-obsolete-value old new)
  35.   `(block
  36.      (define ,old ,new)
  37.      (declare-tsys-exports '(,old . ,new))))
  38.  
  39.  
  40. (let ((msg "call to a system procedure using an obsolete name."))
  41.   (define (%obsolete old-name new-name new)
  42.     (let ((warned? nil))
  43.       (object (lambda args
  44.                 (cond ((and (not warned?) *mention-obsolete-references?*)
  45.                        (warning '("~a~%"
  46.                                   ";**~12t ~S has been renamed to be ~S.~%")
  47.                                 msg
  48.                                 old-name
  49.                                 new-name)
  50.                        (set warned? t)))
  51.                 (apply new args))
  52.         ((print-type-string self) "Obsolete")
  53.         ((identification self) old-name)
  54.         ((setter self) (setter new))))))
  55.  
  56. (let ((msg0 "~s has changed in version ~s.~s (~s)~%~s~%")
  57.       (msg1 "see the T3 manual or release notes for details."))
  58.   (define (%system-change name proc message)
  59.     (let ((warned? nil))
  60.       (object (lambda args
  61.                 (cond ((and (not warned?) *mention-changes?*)
  62.                        (warning msg0
  63.                                 name
  64.                                 (major-version t-system)
  65.                                 (minor-version t-system)
  66.                                 (link-edit  t-system)
  67.                                 message
  68.                                 msg1)
  69.                        (set warned? t)))
  70.                 (apply proc args))
  71.               ((print-type-string self) "System Change")
  72.               ((identification self) name)
  73.               ((setter self) (setter proc))))))
  74.  
  75. ;;; DEFUNCT - adj. : having finished the course of life or existence -
  76. ;;; Webster's 9th.  It is used to inform users of defunct procedures.
  77.  
  78. (define-local-syntax (define-defunct old . info)
  79.   `(block
  80.      (define ,old (%defunct ',old ,@info))
  81.      (declare-tsys-exports ',old)))
  82.  
  83. (let ((msg "Attempt to call a defunct procedure - ~a ~a"))
  84.   (define (%defunct old-name . info)
  85.     (object (lambda args
  86.               (let ((aux (if info
  87.                              (format nil "~%**~10t~a" (car info))
  88.                              "")))
  89.                 (error msg `(,old-name ,@args) aux)))
  90.         ((print-type-string self) "Defunct")
  91.         ((identification self) old-name))))
  92.  
  93.  
  94. (lset *mention-obsolete-references?* t)
  95. (lset *mention-changes?* t)
  96.  
  97. ;;; Add new entries to bottom of list, with date added.
  98.  
  99. ;;; T3 changes - 18 March 1986
  100.  
  101. (define-obsolete-value *t-implementation-env*  t-implementation-env)
  102. (define-obsolete-value *standard-read-table*   standard-read-table)
  103. (define-obsolete-value *vanilla-read-table*    vanilla-read-table)
  104. ;(define-obsolete-value *standard-syntax-table* standard-syntax-table)
  105. (define-obsolete-value *read-keyword-table*    read-keyword-table)
  106. (define-obsolete-value *eof*                   eof)
  107. (define-obsolete-value *repl-wont-print*       repl-wont-print)
  108. (define-obsolete-value *number-of-char-codes*  number-of-char-codes)
  109. (define-obsolete-value *min-fixnum*            most-negative-fixnum)
  110. (define-obsolete-value *max-fixnum*            most-positive-fixnum)
  111. (define-obsolete-value *t-version-number*      version-number)
  112.  
  113. (define-obsolete stream?                   port?)
  114. (define-obsolete input-stream?             input-port?)
  115. (define-obsolete output-stream?            output-port?)
  116. (define-obsolete interactive-stream?       interactive-port?)
  117. (define-obsolete stream-read-table         port-read-table)
  118. (define-obsolete stream-filename           port-name)
  119. (define-obsolete make-output-width-stream  make-output-width-port)
  120. (define-obsolete make-broadcast-stream     make-broadcast-port)
  121. (define-obsolete make-echo-stream          make-echo-port)
  122. (define-defunct string->input-stream)
  123. (define-defunct make-output-to-string-stream)
  124.  
  125. ;;; Called from macro expansions.
  126.  
  127. (define-obsolete with-open-streams-handler with-open-ports-handler)
  128.  
  129. (define-obsolete fxrem                     fx-rem)
  130. (define-obsolete div                       quotient)
  131. (define-obsolete values                    return)
  132.  
  133. (define-defunct *the-symbol-table*)
  134. (define-defunct make-symbol)
  135. (define-defunct intern)
  136. (define-defunct really-intern)
  137. (define-defunct interned?)
  138. (define-defunct walk-symbol-table "see WALK-ALL-SYMBOLS")
  139.